﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Nuclex.UserInterface;
using Nuclex.UserInterface.Controls.Desktop;
using Microsoft.Xna.Framework;

using Nuclex.Game.States;

namespace WarPigs
{
    /// <summary>Dialog that demonstrates the capabilities of the GUI library</summary>
    public partial class CreatePMCDialog : WindowControl
    {

        GameState gameState;

        /// <summary>Initializes a new GUI demonstration dialog</summary>
        public CreatePMCDialog(GameState passedState)
        {
            gameState = passedState;
            InitializeComponent();
        }
    }

    partial class CreatePMCDialog
    {

        #region NOT Component Designer generated code

        /// <summary> 
        ///   Required method for user interface initialization -
        ///   do modify the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.spLabel = new Nuclex.UserInterface.Controls.LabelControl();
            this.okButton = new Nuclex.UserInterface.Controls.Desktop.ButtonControl();
            this.cancelButton = new Nuclex.UserInterface.Controls.Desktop.ButtonControl();
            //
            // helloWorldLabel
            //
            this.spLabel.Text = "REGISTER NEW PRIVATE MILITARY COMPANY";
            this.spLabel.Bounds = new UniRectangle(15.0f, 20.0f, 110.0f, 30.0f);
            //
            //PMC Name label
            //
            //PMC Name text box
            //
            //PMC Color label
            //
            //PMC Color Combo Box

            // registerButton
            //
            this.okButton.Text = "Start Game";
            this.okButton.Bounds = new UniRectangle(
              new UniScalar(1.0f, -180.0f), new UniScalar(1.0f, -40.0f), 80, 24
            );
            okButton.Pressed += new EventHandler(okButton_Pressed);
            //
            // Add to dialog
            //
            this.Bounds = new UniRectangle(100.0f, 100.0f, 512.0f, 384.0f);
            Children.Add(this.spLabel);
            Children.Add(this.okButton);
            Children.Add(this.cancelButton);
        }

        void okButton_Pressed(object sender, EventArgs e)
        {
            this.Close();
            ((MainMenuGameState)gameState).newGameStart();
        }

        void cancelButton_Pressed(object sender, EventArgs e)
        {
            this.Close();
        }

        #endregion // NOT Component Designer generated code

        /// <summary>A label used to display a 'hello world' message</summary>
        private Nuclex.UserInterface.Controls.LabelControl spLabel;
        /// <summary>Button which exits the dialog and takes over the settings</summary>
        private Nuclex.UserInterface.Controls.Desktop.ButtonControl okButton;
        /// <summary>Button which exits the dialog and discards the settings</summary>
        private Nuclex.UserInterface.Controls.Desktop.ButtonControl cancelButton;

    }
}
